<%@ page language="java" isELIgnored="false" import="java.util.*"
	pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>抓取网站设置</title>
<script type="text/javascript"
	src="<%=request.getContextPath()%>/fare/js/show.js"></script>
<link href="<%=request.getContextPath()%>/fare/css/base.css"
	rel="stylesheet" type="text/css" />
<script type="text/javascript"
	src="<%=request.getContextPath()%>/fare/js/jquery-1.6.4.min.js"></script>

<style type="text/css">
<!--
.STYLE1 {
	color: #3366cc
}
-->
</style>

<script type="text/javascript">
	//更新状态
	function updateSource(id, crawlStatus) {
		$.post("taskInfoAction!ajaxUpdateSource.action", {"id":id, "crawlStatus":crawlStatus}, function (data) {
			if(data && data == 'ok'){
				window.location.href = "<%=request.getContextPath()%>/taskInfoAction!findListSource.action?"+Math.random();
			}
		});
	}
	
</script>
</head>

<body>
	<form action="taskInfoAction!findListSource.action" method="post" id="sourceForm">
			<table width="100%" border="0" cellpadding="3" CELLSPACING="1"
				class="tabg">
				<tr class="tr1">
					<td colspan="100" style="color: white">抓取网站列表</td>
				</tr>
				<tr class="tr2">
					<td class="title">序号</td>
					<td class="title">编码</td>
					<td class="title">名称</td>
					<td class="title">网站地址</td>
					<td class="title">网站类型</td>
					<td class="title">HBASE_KEY</td>
					<td class="title">最后操作人</td>
					<td class="title">最后操作时间</td>
					<td class="title">操作</td>
				</tr>
				<c:forEach items="${sourceVOList }" var="source" varStatus="v">
					<tr class="tr2" onMouseOver="fSetBg(this)" onMouseOut="fReBg(this)">
						<td>${v.count }</td>
						<td>${source.carrierKey }</td>
						<td>${source.name }</td>
						<td>${source.url}</td>
						<td>${source.webTyle == 1 ? '官网' : '渠道' }</td>
						<td>${source.hbaseKey }</td>
						<td>${source.user.userInfo.names }</td>
						<td><fmt:formatDate pattern="yyyy-MM-dd HH:mm" value="${source.userCreateTime}" /></td>
						<td>
							<input type="button" name="crawlStatus"
									id="crawlStatus${v.count }" value="${source.crawlStatus == 1 ? 'ON' : 'OFF' }" style="width: 30px"
									onclick="updateSource('${source.id }', ${source.crawlStatus == 1 ? 0 : 1 });">	
						</td>
					</tr>
				</c:forEach>
			</table>
	</form>
</body>
</html>



